﻿using System;

namespace ZilLion.Service.Core.Ioc
{
    public static class ServiceProviderEx
    {
        public static T GetInstance<T>(this IServiceProvider @this)
        {
            var instance = (T) @this.GetService(typeof(T));
            return instance;
        }
    }
}